#ifndef SCENEVIEW_H_
#define SCENEVIEW_H_

#include "view.h"
#include "camera/camera.h"
#include "model/sceneModel.h"
#include "objectModelRenderer.h"
#include "fog.h"

class SceneView : public View {
	protected:
		SceneModel& model;
		Camera* camera;
		ObjectModelRenderer renderer;
		Fog* fog;
	public:
		SceneView(const Rectangle& viewport,SceneModel& model,Fog* fog=NULL);
		virtual ~SceneView();

		Camera& getCamera(){ return *camera; }
		virtual void setEnv()=0;
		virtual void display();
		virtual void update(Observer* observer){}
		void renderObject(SceneObject& object);
		void displaySubObjects(SceneObject* obj);

		void renderText(const std::string& text,float x,float y,void* font = GLUT_BITMAP_TIMES_ROMAN_24);

		void setFog(Fog* fog);

		void addZoomFactor(float factor);

		void notifyActivate();

		virtual void takeScreenshot(bool clean=true);
	protected:
		virtual void applyWorldTransformations(){}
		virtual void drawObjects();
		virtual void castShadows(SceneObject* obj);
};

#endif /* SCENEVIEW_H_ */

